package com.emotion.sshticket.services;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.emotion.sshticket.dao.AdminDAO;
import com.emotion.sshticket.vo.AdminUserVO;
import com.emotion.sshticket.vo.TicketVO;

@Service("adminService")
public class AdminService {
	@Resource(name="adminDAO")
	private AdminDAO adminDAO;

	public AdminUserVO getAdminLoginInfo(String userId, String userPw) throws Exception {
		Map<String, Object> paramMap = new HashMap<String, Object>();
		paramMap.put("userId", userId);
		paramMap.put("userPw", userPw);
		return adminDAO.getAdminLoginInfo(paramMap);
	}

	public int getTotalTicketList(Map<String, Object> paramMap) throws Exception {
		return adminDAO.getTotalTicketList(paramMap);
	}

	public List<TicketVO> getTicketList(Map<String, Object> paramMap) throws Exception {
		return adminDAO.getTicketList(paramMap);
	}

	public TicketVO getTicketInfo(String seq) throws Exception {
		return adminDAO.getTicketInfo(seq);
	}

	public void updateTicketInfo(TicketVO ticketVO) {
		adminDAO.updateTicketInfo(ticketVO);
	}

	public void updatePayState(String flag) {
		adminDAO.updatePayState(flag);
	}

	public void updateMailState(String seq) {
		adminDAO.updateMailState(seq);
	}





}
